package com.cloud.streamconsumerself;

import com.cloud.streamconsumerself.error.TestTopic1;
import com.cloud.streamconsumerself.noerror.TestTopic2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;

/**
 * Spring Cloud Stream如何消费自己生产的消息
 *
 * 启动 RabbitMQ、stream-consumer-self
 *
 * 访问：localhost:8080/sendMessage?message=hello-didi
 */
//@EnableBinding(TestTopic1.class)
@EnableBinding(TestTopic2.class)
@SpringBootApplication
public class StreamConsumerSelfApplication {

    public static void main(String[] args) {
        SpringApplication.run(StreamConsumerSelfApplication.class, args);
    }

}
